package demo2;

import java.util.Scanner;

public class Test {
    //用封装思想 判断数字
    public static void main(String[] args) {
        Person person1 = new Person();
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()){
            int age = scanner.nextInt();
            person1.setAge(age);
            System.out.println(person1.getAge());
        }
    }
}
